/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;
import java.math.BigInteger;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author wyr
 */
@Entity
@Table(name = "main_key")
//@NamedQueries({@NamedQuery(name = "MainKey.findAll", query = "SELECT m FROM MainKey m"), @NamedQuery(name = "MainKey.findByKeyName", query = "SELECT m FROM MainKey m WHERE m.keyName = :keyName"), @NamedQuery(name = "MainKey.findByKeyValue", query = "SELECT m FROM MainKey m WHERE m.keyValue = :keyValue"), @NamedQuery(name = "MainKey.findByRemark", query = "SELECT m FROM MainKey m WHERE m.remark = :remark")})
public class MainKey implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "key_name")
    private String keyName;
    @Column(name = "key_value")
    private BigInteger keyValue;
    @Column(name = "remark")
    private String remark;

    public MainKey() {
    }

    public MainKey(String keyName) {
        this.keyName = keyName;
    }

    public String getKeyName() {
        return keyName;
    }

    public void setKeyName(String keyName) {
        this.keyName = keyName;
    }

    public BigInteger getKeyValue() {
        return keyValue;
    }

    public void setKeyValue(BigInteger keyValue) {
        this.keyValue = keyValue;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (keyName != null ? keyName.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof MainKey)) {
            return false;
        }
        MainKey other = (MainKey) object;
        if ((this.keyName == null && other.keyName != null) || (this.keyName != null && !this.keyName.equals(other.keyName))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.MainKey[keyName=" + keyName + "]";
    }

}
